home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20000217-20000824
/
000042_news@columbia.edu _Wed Feb 23 15:10:31 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2000-08-23
|
4KB
Return-Path: <news@columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id PAA22210
for <kermit.misc@watsun.cc.columbia.edu>; Wed, 23 Feb 2000 15:10:31 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id OAA27416
for kermit.misc@watsun.cc.columbia.edu; Wed, 23 Feb 2000 14:51:20 -0500 (EST)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Subject: Re: Array name passed to macro as argument?
Date: 23 Feb 2000 19:51:19 GMT
Organization: Columbia University
Message-ID: <891dnn$qol$1@newsmaster.cc.columbia.edu>
To: kermit.misc@columbia.edu
In article <Jf10IGSklAzn@cc.usu.edu>, Joe Doupnik <jrd@cc.usu.edu> wrote:
: Just a comment from the trenches on this item. The fancier notation
: used by Frank is nifty. However when it comes to implementing it in
: assembler within a small space for a DOS program and inside of especially
: complex code for parsing, then things are sticky. Thus I decided to not
: implement the dot semicolon-equal etc material as there are equivalent
: ways of accomplishing the goal. Appologies for the inconvience of having
: two ways of doing this.
: Joe D.
:
MS-DOS Kermit, C-Kermit, and K95 are different programs that are written in
and for different development and operating environments. When comparing
these three Kermit programs, remember:
. C-Kermit (in the general case) and K95 are developed in and for "large
memory" environments, whereas MS-DOS Kermit is painstakingly
constructed for the traditional memory-constrained environment (640K,
less space needed for DOS, running an external shell, etc) where there
is not as much room for features.
. MS-DOS Kermit (at least when you run it in DOS) can do things that K95
and C-Kermit can not do, because it has direct access to the hardware:
communications port, video adapter, keyboard, etc. C-Kermit and K95
are not allowed this kind of access, and therefore can never do certain
things that MS-DOS Kermit can.
C-Kermit and K95 have compatible script languages because they share common
code. MS-DOS Kermit is a separate code base, and there are some language
differences. We have made an attempt at enumerating these in:
http://www.columbia.edu/kermit/scriptref.html
Corrections, additions, suggestions welcome.
The addition of C-like (well, really more Bliss-like) ".variable = value"
notation to C-Kermit and K95 was not just to make the Kermit language look
more natural to programmers, but also to add a certain clarity. For those
who haven't encountered this notation before, here's how it goes:
.variable = string
This is equivalent to "define variable string",
i.e. set the variable's value to the string on the right hand side
.variable := string
This is equivalent to "assign variable string",
i.e. set the variable's value to the VALUE of the string on the
right hand side.
.variable ::= string
Here the string is assumed to be a mathematical expression. First it
is evaluated in the Kermit sense (variables expanded, etc), and then
it is evaluated in the arithmetic sense, and the result is assigned
to the variable.
To illustrate:
Statement Result Portable method
.\%a = 1 1 define \%a 1
.\%b = 2 2 define \%b 2
.sum = \%a + \%b \%a + \%b define sum \%a + \%b
.sum := \%a + \%b 1 + 2 assign sum \%a + \%b
.sum ::= \%a + \%b 3 assign sum \feval(\%a + \%b)
As new features like this (and this only one of many) are added to K95 and
C-Kermit, increasing care must be taken by those who want to write scripts
that also execute in MS-DOS Kermit. The script reference mentioned above
shows you which features you can use in which versions of each program.
- Frank